package com.yl.danmo.service.impl;

import com.yl.common.core.utils.DateUtils;
import com.yl.danmo.domain.DanmoPersonInfo1;
import com.yl.danmo.mapper.DanmoPersonInfo1Mapper;
import com.yl.danmo.service.IDanmoPersonInfo1Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 会员详情1Service业务层处理
 * 
 * @author yl
 * @date 2025-04-12
 */
@Service
public class DanmoPersonInfo1ServiceImpl implements IDanmoPersonInfo1Service
{
    @Autowired
    private DanmoPersonInfo1Mapper danmoPersonInfo1Mapper;

    /**
     * 查询会员详情1
     * 
     * @param id 会员详情1主键
     * @return 会员详情1
     */
    @Override
    public DanmoPersonInfo1 selectDanmoPersonInfo1ById(Long id)
    {
        return danmoPersonInfo1Mapper.selectDanmoPersonInfo1ById(id);
    }

    /**
     * 查询会员详情1列表
     * 
     * @param danmoPersonInfo1 会员详情1
     * @return 会员详情1
     */
    @Override
    public List<DanmoPersonInfo1> selectDanmoPersonInfo1List(DanmoPersonInfo1 danmoPersonInfo1)
    {
        return danmoPersonInfo1Mapper.selectDanmoPersonInfo1List(danmoPersonInfo1);
    }

    /**
     * 新增会员详情1
     * 
     * @param danmoPersonInfo1 会员详情1
     * @return 结果
     */
    @Override
    public int insertDanmoPersonInfo1(DanmoPersonInfo1 danmoPersonInfo1)
    {
        danmoPersonInfo1.setCreateTime(DateUtils.getNowDate());
        return danmoPersonInfo1Mapper.insertDanmoPersonInfo1(danmoPersonInfo1);
    }

    /**
     * 修改会员详情1
     * 
     * @param danmoPersonInfo1 会员详情1
     * @return 结果
     */
    @Override
    public int updateDanmoPersonInfo1(DanmoPersonInfo1 danmoPersonInfo1)
    {
        danmoPersonInfo1.setUpdateTime(DateUtils.getNowDate());
        return danmoPersonInfo1Mapper.updateDanmoPersonInfo1(danmoPersonInfo1);
    }

    /**
     * 批量删除会员详情1
     * 
     * @param ids 需要删除的会员详情1主键
     * @return 结果
     */
    @Override
    public int deleteDanmoPersonInfo1ByIds(Long[] ids)
    {
        return danmoPersonInfo1Mapper.deleteDanmoPersonInfo1ByIds(ids);
    }

    /**
     * 删除会员详情1信息
     * 
     * @param id 会员详情1主键
     * @return 结果
     */
    @Override
    public int deleteDanmoPersonInfo1ById(Long id)
    {
        return danmoPersonInfo1Mapper.deleteDanmoPersonInfo1ById(id);
    }
}
